/*
 * @Author: Mcfly
 * @Date: 2021-07-18 21:29:46
 * @LastEditTime: 2021-11-07 05:45:55
 * @LastEditors: Mcfly
 * @Description: 
 * @FilePath: \FTTfly\BSPdriver\OpenMV.h
 * 本人github:https://github.com/McflyWZX
 */
#ifndef __OPENMV_H__
#define __OPENMV_H__

#include "WP_DataType.h"


#include "stdbool.h"
#include "stdint.h"

//底部定点MV
//目前MV传回来的坐标系为大地坐标
typedef struct
{
    bool dataOK;
	bool dataLoop;
    float x;
    float y;
    float angle;
    int8_t option;
} HuiMV;

typedef struct
{
    int8_t x;
    int8_t y;
    int8_t angle;
    int8_t option;
    uint8_t checkSum;
} HuiMV_RawData;

//巡线EyeMV
typedef struct
{
    bool dataOK;
    bool dataLoop;
    uint8_t lossCount;
    uint8_t targetFund;
    float midErr;
    float distance;
} EyeMV;

typedef struct
{
    int8_t midErr;
    int8_t distance;
    uint8_t checkSum;
} EyeMV_RawData;

HuiMV *HuiMV_Init(void);
void HuiMV_Req(HuiMV *mv);
void HuiMV_SetFun(HuiMV *mv, uint8_t reqPack);

EyeMV *EyeMV_Init(void);
void EyeMV_Req(EyeMV *mv);
void EyeMV_SuperFun(EyeMV *mv, uint8_t reqPack);

#endif
